home *** CD-ROM | disk | FTP | other *** search
/ PC Electronics Plus 3 / PC Electronics Plus 3.iso / pcmode / rs232-3.chp < prev    next >
Text File  |  1993-11-14  |  9KB  |  391 lines

  1.  
  2. %
  3. #EF
  4. #T*** CABLE CONFIGURATION ***
  5. #C4,R5
  6. ~Y~I~zThe Straight-Through Cable:~N
  7. #BN,6,7,77,15,3,0,1,7,0,7
  8. A Straight-through cable connects a wire from pin 1 on side 1 to
  9.  
  10. pin 1 on side 2. Another wire from pin 2 on side 1 connects pin 2
  11.  
  12. on side 2.  Still another wire from pin 3 side 1 connects pin 3
  13.  
  14. side 2, and so on.
  15.  
  16.  
  17. The standard PC-to-modem cable is an example of the straight
  18. through cable.
  19. #BN,6,20,77,24,3,0,1,3,15,6
  20. The 25 pins of RS-232 was designed with the straight through cable
  21.  
  22. in mind.
  23. #WN
  24.  
  25. %
  26. #EF
  27. #T
  28. #C4,R5
  29.  
  30. ~W~I~zA Small Cable Problem Example:~N
  31. #BN,5,9,76,15,3,0,1,5,0,7
  32. Let's say we have a client with a modem as it turns out never
  33.  
  34. applies power to pin 5, CTS.  It powers up pin 6, DSR, and 8,
  35.  
  36. DCD, when carrier is detected.
  37.  
  38.  
  39.  
  40. ~W~IThe state of the leads were determined by use of a tester
  41. called |Break Out Box|.~N
  42.  
  43. ~W~IThe terminal will not communicate without the CTS lead in
  44. |high state|.~N
  45. #WP
  46. %
  47. #EF
  48. #T
  49. #C4,R5
  50.  
  51. ~W~ISolution:~N
  52.  
  53. #BN,5,9,79,22,3,0,1,11,15,6
  54. Construct a cable that is straight-through except for pin 5.  We know
  55.  
  56. DCD is working and switches to high state during a communication
  57.  
  58. attempt.  Since the PC is looking for a CTS on pin 5, place a jumper
  59.  
  60. wire from DCD pin 8 to pin 5 in the connector at the PC side.  Now when
  61.  
  62. DCD is raised, CTS will also go to a high state and show activity.
  63.  
  64. Your client will be very happy with your success.
  65.  
  66. #WP,N
  67.  
  68. %
  69. #EF
  70. #T
  71. #C4,R5
  72. ~W~I~zPC-to-PC and DTE to Serial Printer Cable Design:~N
  73.  
  74.  
  75. ~Y~I~yNow we will design a cable many people find useful.~N  ~HMany cables are
  76.  
  77. just variations of the straight-through cable.~N  Others are designed
  78.  
  79. to solve the |null modem| problem.  ~W~I~gRemember, RS-232 is designed to
  80.  
  81. connect DTEs to DCEs.~N Both the printer and terminals have DTE-type
  82.  
  83. interfaces. ~Y~I~FAccording to the RS-232 standard, you can not directly
  84.  
  85. connect two DTE interfaces.~N  ~W~I~yDTE-type interface require  modem (DCE)
  86.  
  87. circuits between them.~N
  88.  
  89. #WP
  90. #QQ,B,5
  91. QUICK QUESTION:
  92.  
  93. A TYPE OF CABLE SUCH THAT PIN 1 THROUGH PIN 25 ON ONE
  94. SIDE IS WIRED TO PINS 1 THROUGH 25 ON THE OTHER SIDE
  95. IS CALLED:
  96. STRAIGHT THROUGH
  97. STRAIGHT,through,straight through
  98.  
  99. %
  100. #EF
  101. #T
  102. #BN,5,5,79,11,3,0,1,5,15,6
  103. One solution would be to hook up a modem to the printer, another
  104.  
  105. to the terminal, and run the shortest phone line you've ever seen
  106.  
  107. between two modems.
  108.  
  109.  
  110. #BN,5,13,79,19,3,0,1,5,15,5
  111. A better solution would be to construct a cable which allows us
  112.  
  113. to avoid the two modems, called a modem elimimator or null modem
  114.  
  115. cable.
  116.  
  117.  
  118. ~H~FRemember~N, ~Hwe're trying to get two DTE's to talk to each other.
  119.  
  120. Both are trying to transmit on line 2 and receive on line 3.~N
  121.  
  122.  
  123. #WP,N
  124.  
  125. %
  126. #EF
  127. #T
  128.  
  129.                 TD 2 -------------------- 3 RD
  130.  
  131.  
  132.                 RD 3 -------------------- 2 TD
  133.  
  134.  
  135.                 SG 7 -------------------- 7 SG
  136.  
  137. #C4
  138.    ~K~Y~IThis is a simple null modem cable without control leads.~N~k  ~W~I~cLine 7
  139.  
  140.    is included because it is the signal ground and must be present to
  141.  
  142.    ensure that both sides agree on what a high signal and a low signal
  143.  
  144.    represents.~N  ~FNotice pins 2 and 3 are crossed~N.
  145.  
  146. #WN,P
  147. %
  148. #EF
  149. #T
  150. #C4,R6
  151. ~W~I~mMany times the simple null modem cable works because most software
  152.  
  153. packages make only minimal use of control leads.~N  ~Y~IMost have no
  154.  
  155. need of control leads at all if flow control is not needed.~N  ~W~I~yA
  156.  
  157. Break Out Box is used to determine whether flow control leads are being used
  158.  
  159. during transmissions.~N
  160.  
  161.  
  162. ~Y~I~rContinuing the development of the more complex null modem cable using
  163.  
  164. flow control, next we address power status lines 6 and 20.~N
  165.  
  166. #WP,N
  167.  
  168. %
  169. #EF
  170. #T
  171. #C4,R6
  172. ~Y~I~mBoth Terminals are DTEs and they're both activating line 20 while
  173.  
  174. at the same time looking for activity on line 6, DSR.~N
  175.  
  176.  
  177. ~Y~I~FNeither of the DTE's are activating lead 6.~N  ~Y~I~gWe can address this in
  178.  
  179. one of two ways.  One preserves the |handshake protocol|, the other one
  180.  
  181. does not.~N
  182.  
  183.  
  184. ~W~I~yThe method that preserves the handshake is the crossover:  6 on side 1
  185.  
  186. to 20 on side 2.  Lead 20 on side 1 to 6 on side 2.~N
  187.  
  188. #WP
  189. %
  190. #EF
  191. #T
  192.  
  193.                           NULL MODEM CABLE
  194.  
  195.  
  196.                     TD 2 -------------------- 3 RD
  197.  
  198.                     RD 3 -------------------- 2 TD
  199.  
  200.                    DSR 6 -------------------- 20 DTR
  201.  
  202.                     SG 7 -------------------- 7 SG
  203.  
  204.                    DTR 20 ------------------- 6 DSR
  205.  
  206.  
  207. #BN,6,20,79,22,3,0,1,1,14,4
  208.      The handshake configuration looks like the above design
  209.  
  210. #WP,N
  211.  
  212. %
  213. #EF
  214. #T
  215. #C4,R7
  216. ~Y~I~rThe second null modem cable design does not preserve handshake.~N
  217.  
  218. ~HConsider that all each side need is to see activity on line 6
  219.  
  220. when there is activity on line 20.~N  ~Y~I~gWe solve this by wrapping the
  221.  
  222. lines around on each side so that each side is controlling  its
  223.  
  224. own DTR and DSR.~N ~W~I~yWhen the terminal activates DTR on line 20, DSR
  225.  
  226. on line 6 is also activated in this configuration.~N  ~HDSR on line 6
  227.  
  228. will maintain a +3 volts and remain high as long as DTR is high.~N
  229.  
  230. #WP,N
  231. #QQ,B,4
  232. QUICK QUESTION:
  233.  
  234. WHICH RS232 LEAD ENSURES EACH SIDE KNOWS THE
  235. DIFFERENCE BETWEEN A "HIGH SIGNAL" AND A "LOW SIGNAL" ?
  236. PIN 7
  237. 7,pin7,seven
  238. %
  239. #EF
  240. #T
  241.  
  242.              ~G~I          NULL MODEM CABLE
  243.  
  244.  
  245.                 TD 2 -------------------- 3 RD
  246.  
  247.                 RD 3 -------------------- 2 TD
  248.  
  249.                 SG 7 -------------------- 7 SG
  250.  
  251.                DSR 6  --               -- 6  DSR
  252.                          L            L
  253.                DTR 20 --               -- 20 DTR
  254.                                                   ~N
  255.  
  256.  
  257. #BN,6,20,79,22,3,0,1,1,14,4
  258.     In this configuration, link DTR to DSR on each side of the cable.
  259.  
  260. #WP
  261. %
  262. #EF
  263. #T
  264. #C5,R4
  265. ~W~I~zAdvantages:~N
  266.  
  267. ~H~KWhich is the better null modem design?~N~k  ~W~I~cIf the equipment actually
  268.  
  269. uses lead 6 and 20, you need the handshake crossover method.~N  ~Y~IIf you
  270.  
  271. are using equipment that does not use handshaking, it doesn't matter
  272.  
  273. which method.~N  ~W~I~yIf you are running long cables and the number of wires
  274.  
  275. in each cable is important cost-wise, the no-handshake method is
  276.  
  277. the better one to use.~N
  278.  
  279.  
  280. ~Y~I~rThe RTS and CTS are completed in a similar manner.  You can cross
  281.  
  282. leads 4 and 5 from one side of the cable to the next or link leads 4
  283.  
  284. and 5 on each side.~N
  285. #WP,N
  286.  
  287. %
  288. #EF
  289. #T
  290.  
  291.                        ~HNULL MODEM CABLE
  292.  
  293.  
  294.                 TD 2 -------------------- 3 RD
  295.  
  296.                 RD 3 -------------------- 2 TD
  297.  
  298.                RTS 4 -------------------- 5 CTS
  299.  
  300.                CTS 5 -------------------- 4 RTS
  301.  
  302.                DSR 6 -------------------- 20 DTR
  303.  
  304.                 SG 7 -------------------- 7 SG
  305.  
  306.                DTR 20 ------------------- 6 DSR~N
  307.  
  308.                   ~Y~I~rRTS/CTS Control leads added~N
  309.  
  310.  
  311. #WP,N
  312.  
  313. %
  314. #EF
  315. #T
  316. #C5,R5
  317. ~W~I~yLast is the DCD |carrier| lead pin 8.~N  ~HMany software packages require
  318.  
  319. a DCD signal before |polling| is activated.~N  ~Y~I~rSince DCD is an input
  320.  
  321. for the equipment on both sides of the cable, we need a active lead
  322.  
  323. to connect them to.~N
  324.  
  325.  
  326. ~W~I~cWe can link the DCD on each side of the cable to lead 20, DTR.~N
  327.  
  328. ~H~FShown on the next page is the complete null modem cable with
  329.  
  330. control leads~N.  ~W~I~rThis cable can be used from a DTE-type terminal
  331.  
  332. to a serial printer or for communications between two personal
  333.  
  334. computers.~N
  335. #WP,N
  336.  
  337. %
  338. #EF
  339. #T
  340.  
  341.                     ~W~I   NULL MODEM CABLE
  342.  
  343.                 TD 2 -------------------- 3 RD
  344.  
  345.                 RD 3 -------------------- 2 TD     Link Carrier leads
  346.                                                            to
  347.                RTS 4 -------------------- 5 CTS    Data terminal ready
  348.  
  349.                CTS 5 -------------------- 4 RTS
  350.  
  351.                 SG 7 -------------------- 7 SG
  352.  
  353.                DTR 20  ------------------- 6 DSR
  354.                       L
  355.                DCD 8   -----------------  8 DCD
  356.                                         L
  357.                DSR 6 -------------------  20 DTR ~N
  358.  
  359.                  ~Y~I~rRTS/CTS Control leads added~N
  360.  
  361.  
  362.  
  363. #WP,N
  364. %
  365. #EF
  366. #SK,R,R,1
  367. #T15,1
  368. #BO,20,7,60,17,7,1,1,8,15,1
  369. WASN'T THAT A FUN AND INTERESTING
  370. CHAPTER !!
  371.  
  372. NOW TRY THE CABLE CONFIGURATION TEST.
  373.  
  374. PAGEBACK IF YOU NEED TO REVIEW BEFORE
  375.  
  376. YOU TAKE IT.
  377.  
  378. #AC,32,11,15,1,~b~W~I~FGOOD LUCK, ~U1~N
  379. #WP,N
  380.  
  381. #QT,Q,RS232-3
  382. #WP,N
  383. #QT,T,RS232-3
  384. #W,N,P
  385.  
  386. #EF
  387. #SK,R,R,3
  388. #VNOTFREE.VOI
  389. #WP
  390. #X
  391.